package de.stefanocke.roo.wicket.base;

import java.util.Map;

/**
 * By implementing this interface a Metadata item announces that it wants a
 * property file to be created
 * or updated with the given properties.
 * 
 * @author stoc
 * 
 */
public interface PropertyFileChanges {

	/**
	 * 
	 * @return a name / value map of the properties to add to the property file.
	 *         Null means, that no property file is required at all.
	 */
	Map<String, String> getPropertiesToAdd();

	/**
	 * Support for property renaming.
	 * 
	 * @return a old name / new name map of the properties to rename in the
	 *         property file. If the old name is found in the property
	 *         file, the old property is removed and a new one is added with the
	 *         same value. Only if the old property is not found, the value for
	 *         the new property name from {@link #getPropertiesToAdd()} is
	 *         considered. Maybe null if the metadata item does not implement property renaming detection.
	 * @see <a
	 *      href="http://code.google.com/p/wicket4roo/issues/detail?id=6">Issue
	 *      6</a>
	 */
	Map<String, String> getPropertiesToRename();

	// ??
	// Set<String> getPropertiesToDelete();

}
